#!/bin/bash
function access
{
    local root
    root=$1
    if [ -d root ]
	for file in root\*
	do
	    access root\$file
	done
    else
	echo root
    fi
}
access scheme